// 本js用来存储项目样式和主题颜色
import md5 from '@/utils/md5.js'

export default {
	baseURL: 'https://test.jieoukeji.com/juya-api/', //测试
	webURL: 'https://test.jieoukeji.com/juyaH5/', //测试（前端）
	mpAppID: 'wx39bb1de209731428', // test

	// baseURL: 'https://xiangqu.cmkj360.com/xq-api/', //正式
	// webURL: 'https://xiangqu.cmkj360.com/', //正式（前端）
	// mpAppID: 'wxc2544aec26af2898', // 正式



	commonHeader() {
		let token = uni.getStorageSync("token") || '';

		let headerObj = {
			"access-token": token,
			"client-version": '1.0.0',
			"application-no": 2,
			"client-type": 5,
			"access-timestamp": (new Date()).getTime()
		}


		let curPlatform = uni.getSystemInfoSync().osName

		// #ifdef APP-PLUS
		headerObj["client-type"] = curPlatform == 'ios' ? 4 : 3
		// #endif
		// #ifdef H5
		headerObj["client-type"] = 5
		// #endif  

		// md5加密
		let originStr = 'xiangqu_access_sign' + headerObj["client-type"] + headerObj["client-version"] +
			(headerObj["access-token"] ? headerObj["access-token"] : '') + headerObj[
				"access-timestamp"]

		headerObj["access-sign"] = md5(originStr)

		return headerObj
	},
	themeList: [
		//   {
		//   title: '官方',
		//   name: 'default',
		//   color: '#fa436a',
		//   tabList: ["/static/images/tabBar/home-default.png", "/static/images/tabBar/class-default.png",
		//     "/static/images/tabBar/cart-default.png", "/static/images/tabBar/user-default.png"
		//   ]
		// }, 
		{
			title: '嫣红',
			name: 'red',
			color: '#e54d42',
			tabList: ["/static/images/tabBar/tab-home-red.png", "/static/images/tabBar/tab-cate-red.png",
				"/static/images/tabBar/tab-cart-red.png", "/static/images/tabBar/tab-user-red.png"
			]
		}, {
			title: '桔橙',
			name: 'orange',
			color: '#f37b1d',
			tabList: ["/static/images/tabBar/tab-home-orange.png", "/static/images/tabBar/tab-cate-orange.png",
				"/static/images/tabBar/tab-cart-orange.png", "/static/images/tabBar/tab-user-orange.png"
			]
		}, {
			title: '明黄',
			name: 'yellow',
			color: '#fbbd08',
			tabList: ["/static/images/tabBar/tab-home-yellow.png", "/static/images/tabBar/tab-cate-yellow.png",
				"/static/images/tabBar/tab-cart-yellow.png", "/static/images/tabBar/tab-user-yellow.png"
			]
		}, {
			title: '橄榄',
			name: 'olive',
			color: '#8dc63f',
			tabList: ["/static/images/tabBar/tab-home-olive.png", "/static/images/tabBar/tab-cate-olive.png",
				"/static/images/tabBar/tab-cart-olive.png", "/static/images/tabBar/tab-user-olive.png"
			]
		}, {
			title: '森绿',
			name: 'green',
			color: '#39b54a',
			tabList: ["/static/images/tabBar/tab-home-green.png", "/static/images/tabBar/tab-cate-green.png",
				"/static/images/tabBar/tab-cart-green.png", "/static/images/tabBar/tab-user-green.png"
			]
		}, {
			title: '天青',
			name: 'cyan',
			color: '#1cbbb4',
			tabList: ["/static/images/tabBar/tab-home-cyan.png", "/static/images/tabBar/tab-cate-cyan.png",
				"/static/images/tabBar/tab-cart-cyan.png", "/static/images/tabBar/tab-user-cyan.png"
			]
		}, {
			title: '海蓝',
			name: 'blue',
			color: '#0081ff',
			tabList: ["/static/images/tabBar/tab-home-blue.png", "/static/images/tabBar/tab-cate-blue.png",
				"/static/images/tabBar/tab-cart-blue.png", "/static/images/tabBar/tab-user-blue.png"
			]
		}, {
			title: '姹紫',
			name: 'purple',
			color: '#6739b6',
			tabList: ["/static/images/tabBar/tab-home-purple.png", "/static/images/tabBar/tab-cate-purple.png",
				"/static/images/tabBar/tab-cart-purple.png", "/static/images/tabBar/tab-user-purple.png"
			]
		}, {
			title: '木槿',
			name: 'mauve',
			color: '#9c26b0',
			tabList: ["/static/images/tabBar/tab-home-mauve.png", "/static/images/tabBar/tab-cate-mauve.png",
				"/static/images/tabBar/tab-cart-mauve.png", "/static/images/tabBar/tab-user-mauve.png"
			]
		}, {
			title: '桃粉',
			name: 'pink',
			color: '#e03997',
			tabList: ["/static/images/tabBar/tab-home-pink.png", "/static/images/tabBar/tab-cate-pink.png",
				"/static/images/tabBar/tab-cart-pink.png", "/static/images/tabBar/tab-user-pink.png"
			]
		}, {
			title: '棕褐',
			name: 'brown',
			color: '#a5673f',
			tabList: ["/static/images/tabBar/tab-home-brown.png", "/static/images/tabBar/tab-cate-brown.png",
				"/static/images/tabBar/tab-cart-brown.png", "/static/images/tabBar/tab-user-brown.png"
			]
		}, {
			title: '玄灰',
			name: 'grey',
			color: '#8799a3',
			tabList: ["/static/images/tabBar/tab-home-grey.png", "/static/images/tabBar/tab-cate-grey.png",
				"/static/images/tabBar/tab-cart-grey.png", "/static/images/tabBar/tab-user-grey.png"
			]
		}, {
			title: '墨黑',
			name: 'black',
			color: '#333333',
			tabList: ["/static/images/tabBar/tab-home-black.png", "/static/images/tabBar/tab-cate-black.png",
				"/static/images/tabBar/tab-cart-black.png", "/static/images/tabBar/tab-user-black.png"
			]
		}
	]
};